/*
 * Copyright (c) 2021, 2022, yzfh.cn All rights reserved.
 *
 */
package com.ly.mp.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Select;

/**
 * @author yzfh
 * @Date 2022/02/24 星期四 10:44:12
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
public class User {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String userName;

    @TableField(select = false)//查询时不返回该字段的值
    private String password;
    private String name;
    private Integer age;

    @TableField(value = "email")//指定数据库中的列表名
    private String mail;

    //在数据库中是不存在的
    @TableField(exist = false)
    private String address;

}
